package JAVA300.第十一章多线程;
/**
 * 用于网络下载线程

 */
public class thread_03_webdownloadthread extends Thread {

    private String down_url;
    private String down_filename;

    public thread_03_webdownloadthread(String down_url, String down_filename) {
        this.down_url = down_url;
        this.down_filename = down_filename;
    }

    @Override
    public void run() {
        thread_02_webdownload down = new thread_02_webdownload();
        down.download(this.down_url,this.down_filename);
        System.out.println("本次执行："+this.down_filename);
    }

    public static void main(String[] args) {
        thread_03_webdownloadthread downloader1 = new thread_03_webdownloadthread("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E7%85%A7%E7%89%87&step_word=&hs=0&pn=0&spn=0&di=54890&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=0&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=undefined&cs=152797763%2C3165515443&os=3216707040%2C3109761245&simid=4153755096%2C828140934&adpicid=0&lpn=0&ln=1849&fr=&fmq=1599801235415_R&fm=&ic=undefined&s=undefined&hd=undefined&latest=undefined&copyright=undefined&se=&sme=&tab=0&width=undefined&height=undefined&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fcms.qn.img-space.com%2Fproduct%2F131%2F885%2FceyaVpz1aEwgc.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fn2_z%26e3Bxtvt_z%26e3BgjpAzdH3FtvijAzdH3Fw6ptvsj-ndlbdm9_z%26e3Bip4s&gsm=2&rpstart=0&rpnum=0&islist=&querylist=&force=undefined","threadOut/03-1.jpg");
        thread_03_webdownloadthread downloader2 = new thread_03_webdownloadthread("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E7%85%A7%E7%89%87&step_word=&hs=0&pn=1&spn=0&di=11110&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=0&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=undefined&cs=2254997567%2C3945700522&os=1725846378%2C1987321651&simid=2571802%2C710290865&adpicid=0&lpn=0&ln=1849&fr=&fmq=1599801235415_R&fm=&ic=undefined&s=undefined&hd=undefined&latest=undefined&copyright=undefined&se=&sme=&tab=0&width=undefined&height=undefined&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fwww.tbw-xie.com%2FtuxieJDAxJDI0LzI2MzcwOTk5OTYvVEIyektvUWYkNlhhZSQ2JDYkNl8hITI2MzcwOTk5OTYkOQ.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fq71532_z%26e3Bp7xt_z%26e3Bv54_z%26e3BvgAzdH3Fetjok-80aldn80aanc0lb-80aldn80aanc0lbll9a_z%26e3Bip4s&gsm=2&rpstart=0&rpnum=0&islist=&querylist=&force=undefined","threadOut/03-2.jpg");
        thread_03_webdownloadthread downloader3 = new thread_03_webdownloadthread("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E7%85%A7%E7%89%87&step_word=&hs=0&pn=2&spn=0&di=213840&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=0&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=undefined&cs=2776038988%2C414656587&os=715073392%2C2405308492&simid=3485122946%2C377255779&adpicid=0&lpn=0&ln=1849&fr=&fmq=1599801235415_R&fm=&ic=undefined&s=undefined&hd=undefined&latest=undefined&copyright=undefined&se=&sme=&tab=0&width=undefined&height=undefined&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fpic1.xtuan.com%2Fupload%2Fimage%2F20121019%2F20121019162507_44583.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fn2_z%26e3Bxtvt_z%26e3BgjpAzdH3FtvijAzdH3Fw6ptvsj-ndlbdm9_z%26e3Bip4s&gsm=2&rpstart=0&rpnum=0&islist=&querylist=&force=undefined","threadOut/03-3.jpg");

        //启动三个线程
        downloader1.start();
        downloader2.start();
        downloader3.start();
    }
}
